//
//  MOLockViewController.h
//  WCImApp
//
//  Created by Hyukooooh on 2024/4/7.
//  Copyright © 2024 WCImApp. All rights reserved.
//

#import "QABaseViewController.h"
#import "CoreArchive.h"
typedef NS_ENUM(NSUInteger, MOLockType) {
    MOLockType_Set,
    MOLockType_Verify,
    MOLockType_Modify,
    MOLockType_FirstSet
};

@interface MOLockViewController : QABaseViewController

@property (nonatomic,assign) MOLockType type;
//是否是关闭锁屏操作
@property (nonatomic, assign) BOOL isClosePsd;
@property (nonatomic, assign) BOOL hideLeftNavBtn;
///dismiss动画是否隐藏//默认NO
@property (nonatomic, assign) BOOL hideDismissAnimated;

@property (nonatomic, copy) void(^callBackSetNumberPasswordSuccess)(void);

/**
 *  是否有本地密码缓存？即用户是否设置过初始密码？
 */
+(BOOL)hasPwd;

/**
 清除本地密码缓存，试用或会员过期，则清理本地密码
 */
+ (void)clearPwd;

/**
 *  展示设置密码控制器
 */
+(instancetype)showSettingLockVCInVC:(UIViewController *)vc successBlock:(void(^)(MOLockViewController *lockVC, NSString *pwd))successBlock;

///注册首次设置密码
+ (instancetype)showFirstSettingLockVCInVC:(UIViewController *)vc successBlock:(void(^)(MOLockViewController *lockVC,NSString *pwd))successBlock closeBlock:(void(^)(void))closeBlock;

/**
 *  展示验证密码输入框
 */
+ (instancetype)showVerifyLockVCInVC:(UIViewController *)vc isClose:(BOOL)isClose isPresent:(BOOL)isPresent forgetPwdBlock:(void(^)())forgetPwdBlock successBlock:(void(^)(MOLockViewController *lockVC, NSString *pwd))successBlock;

/**
 *  展示验证密码输入框
 */
+ (instancetype)showModifyLockVCInVC:(UIViewController *)vc forgetPwdBlock:(void(^)())forgetPwdBlock successBlock:(void(^)(MOLockViewController *lockVC, NSString *pwd))successBlock;

/**
 *  消失
 */
-(void)dismiss:(NSTimeInterval)interval;

/// 是否处于锁屏
+ (BOOL)isLocking;
@end
